﻿@{
    ViewBag.Title = "Form";
    Layout = "~/Views/Shared/_Form.cshtml";
}
<script>
    var keyValue = $.request("keyValue");
    $(function () {
        if (!!keyValue) {
            $.ajax({
                url: "/WorkFlowSetting/Buttons/GetFormJson",
                data: { keyValue: keyValue },
                dataType: "json",
                async: false,
                success: function (data) {
                    $("#form1").formSerialize(data);
                }
            });
        }
    });
    function submitForm() {
        if (!$('#form1').formValid()) {
            return false;
        }
        $.submitForm({
            url: "/WorkFlowSetting/Buttons/SubmitForm?keyValue=" + keyValue,
            param: $("#form1").formSerialize(),
            success: function () {
                $.currentWindow().$("#gridList").trigger("reloadGrid");
            }
        })
    }
</script>

<form id="form1">
    <div style="padding-top: 20px; margin-right: 20px;">
        <table class="form">
            <tr>
                <th class="formTitle">按钮名称</th>
                <td class="formValue">
                    <input id="F_Title" name="F_Title" type="text" class="form-control required" placeholder="请录入按钮名称" />
                </td>
            </tr>
            <tr>
                <th class="formTitle">按钮图标</th>
                <td class="formValue">
                    <input id="F_Ico" name="F_Ico" type="text" class="form-control required" placeholder="请录入按钮图标" />
                </td>
            </tr>
            <tr>
                <th class="formTitle" valign="top" style="padding-top: 5px;">
                    执行脚本
                </th>
                <td class="formValue">
                    <textarea id="F_Script" name="F_Script" class="form-control" style="height: 200px;"></textarea>
                </td>
            </tr>
            <tr>
                <th class="formTitle" valign="top" style="padding-top: 5px;">
                    按钮说明 
                </th>
                <td class="formValue">
                    <textarea id="F_Note" name="F_Note" class="form-control" style="height: 60px;"></textarea>
                </td>
            </tr>
        </table>
    </div>
</form>